SELECT * FROM areas
INNER JOIN doors ON `areas`.`idareas` = `doors`.`area1`
GROUP BY `areas`.`idareas`
